package com.ymatou.iapi.sellerproduct.service;

import java.util.Map;

import org.json.JSONObject;

import com.ymttest.business.YmatouAutoTestCall;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.JsonBeanHelper;

public class AddFbxProductCall extends YmatouAutoTestCall{
	private static String opurl ="/api/SellerProduct/AddFbxProduct";
	
	public AddFbxProductCall() {
		super(EnvSetup.getSystemUrl("sellerproduct_iapi"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	
	

	
	
	
	/***
	 * 发布单规格FBX商品
	 * @param fileName
	 * @param updateMap
	 * @return
	 * @throws Exception
	 */
	public static JSONObject addFBXProductOneCatalog(Map<String, Object> updateMap) throws Exception{
		JSONObject addProductBean = JsonBeanHelper.getJsonBean("com.ymatou.iapi.sellerproduct/AddFbxProductCall/addfbxproductcalltpl.json");
		JsonBeanHelper.updateJsonBean(addProductBean, updateMap);
		return new AddFbxProductCall().callAndGetReturnData(addProductBean);
	}
	
	/***
	 * 发布双规格FBX商品
	 * @param fileName
	 * @param updateMap
	 * @return
	 * @throws Exception
	 */
	public static JSONObject addFBXProductTwoCatalog(Map<String, Object> updateMap) throws Exception{
		JSONObject addProductBean = JsonBeanHelper.getJsonBean("com.ymatou.iapi.sellerproduct/AddFbxProductCall/addfbxproductcalltpl001.json");
		JsonBeanHelper.updateJsonBean(addProductBean, updateMap);
		return new AddFbxProductCall().callAndGetReturnData(addProductBean);
	}	
	
	
	
	
	
	
	
}
